#include"head.h"
#include<stdio.h>
#include<stdlib.h>
#include <sys/types.h>
       #include <sys/stat.h>
       #include <fcntl.h>
 #include <unistd.h>

void main(int argc,char *argv[]){
//char file[1000]="123.txt";
char c,a[1000]={0};
//FILE *f;
int f;
int i=0,m,line=0;
f=open(argv[1],O_RDONLY,0);
if(f==NULL){
printf("error!");
return;
}
//c = fgetc(f);
//while(c != EOF)
while(read(f,&c,1)!=0)
{
a[i]=c;
//c = fgetc(f);
i++;
}
close(f);
m=i;
for(i=15;i<=m;)
{
printf("%07x",line);
myod1(a,i);
printf("        ");
myod2(a,i);
i=i+16;
line=line+32;
}
printf("%07x\n",line);
}
